package com.zms.maze;

import java.awt.Point;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;

public class Mummy extends Character implements Serializable {

	private static final long serialVersionUID = 1L;
	
	public MummyType type;
	public int weight=0;
	 
	public Mummy(int startx,int starty,MummyType type) {
		super(startx,starty);
		this.type=type;
	}
	public void writeObject(ObjectOutputStream out) throws IOException {		
		out.writeInt(x);
		out.writeInt(y);
		out.writeInt(type.ordinal());
		out.writeInt(weight);
	}
	public static Mummy readObject(ObjectInputStream in) throws IOException,ClassNotFoundException {
		Mummy mummy=new Mummy(in.readInt(),in.readInt(),MummyType.values()[in.readInt()]);
		mummy.weight=in.readInt();
		return mummy;
	}
	
	

}
